gtkmediafile: Don't leak all the images
authorBenjamin Otte <otte@redhat.com>
Wed, 4 Jul 2018 12:40:13 +0000 (14:40 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 4 Jul 2018 13:05:02 +0000 (15:05 +0200)
We were leaking the GBytes for the image memory, which is a
noticeable memleak to anyone who's casually running a memory monitor.

Go KDE users!

Closes #1200

modules/media/gtkgstsink.c

index da11cbd854879138e85a9d2c8b1f54d4ab369d2b..4959bb86f8d46d39ba56c6bc39b3f229a18f186f 100644 (file)
@@ -131,6 +131,7 @@ gtk_gst_sink_texture_from_buffer (GtkGstSink *self,
                                     gtk_gst_memory_format_from_video (GST_VIDEO_FRAME_FORMAT (&frame)),
                                     bytes,
                                     frame.info.stride[0]);
+  g_bytes_unref (bytes);
   gst_video_frame_unmap (&frame);
 
   return texture;